<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - mbi.info - /usr/include/c++/4.4.1/bits/stl_function.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../../../index.html">directory</a> - <a href="index.html">usr/include/c++/4.4.1/bits</a> - stl_function.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>mbi.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-01-23</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">6</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">100.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">6</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : // Functor implementations -*- C++ -*-
<span class="lineNum">       2 </span>                : 
<span class="lineNum">       3 </span>                : // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
<span class="lineNum">       4 </span>                : // Free Software Foundation, Inc.
<span class="lineNum">       5 </span>                : //
<span class="lineNum">       6 </span>                : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       7 </span>                : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       8 </span>                : // terms of the GNU General Public License as published by the
<span class="lineNum">       9 </span>                : // Free Software Foundation; either version 3, or (at your option)
<span class="lineNum">      10 </span>                : // any later version.
<span class="lineNum">      11 </span>                : 
<span class="lineNum">      12 </span>                : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      13 </span>                : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      14 </span>                : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      15 </span>                : // GNU General Public License for more details.
<span class="lineNum">      16 </span>                : 
<span class="lineNum">      17 </span>                : // Under Section 7 of GPL version 3, you are granted additional
<span class="lineNum">      18 </span>                : // permissions described in the GCC Runtime Library Exception, version
<span class="lineNum">      19 </span>                : // 3.1, as published by the Free Software Foundation.
<span class="lineNum">      20 </span>                : 
<span class="lineNum">      21 </span>                : // You should have received a copy of the GNU General Public License and
<span class="lineNum">      22 </span>                : // a copy of the GCC Runtime Library Exception along with this program;
<span class="lineNum">      23 </span>                : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<span class="lineNum">      24 </span>                : // &lt;http://www.gnu.org/licenses/&gt;.
<span class="lineNum">      25 </span>                : 
<span class="lineNum">      26 </span>                : /*
<span class="lineNum">      27 </span>                :  *
<span class="lineNum">      28 </span>                :  * Copyright (c) 1994
<span class="lineNum">      29 </span>                :  * Hewlett-Packard Company
<span class="lineNum">      30 </span>                :  *
<span class="lineNum">      31 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      32 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      33 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      34 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      35 </span>                :  * in supporting documentation.  Hewlett-Packard Company makes no
<span class="lineNum">      36 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      37 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      38 </span>                :  *
<span class="lineNum">      39 </span>                :  *
<span class="lineNum">      40 </span>                :  * Copyright (c) 1996-1998
<span class="lineNum">      41 </span>                :  * Silicon Graphics Computer Systems, Inc.
<span class="lineNum">      42 </span>                :  *
<span class="lineNum">      43 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      44 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      45 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      46 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      47 </span>                :  * in supporting documentation.  Silicon Graphics makes no
<span class="lineNum">      48 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      49 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      50 </span>                :  */
<span class="lineNum">      51 </span>                : 
<span class="lineNum">      52 </span>                : /** @file stl_function.h
<span class="lineNum">      53 </span>                :  *  This is an internal header file, included by other library headers.
<span class="lineNum">      54 </span>                :  *  You should not attempt to use it directly.
<span class="lineNum">      55 </span>                :  */
<span class="lineNum">      56 </span>                : 
<span class="lineNum">      57 </span>                : #ifndef _STL_FUNCTION_H
<span class="lineNum">      58 </span>                : #define _STL_FUNCTION_H 1
<span class="lineNum">      59 </span>                : 
<span class="lineNum">      60 </span>                : _GLIBCXX_BEGIN_NAMESPACE(std)
<span class="lineNum">      61 </span>                : 
<span class="lineNum">      62 </span>                :   // 20.3.1 base classes
<span class="lineNum">      63 </span>                :   /** @defgroup functors Function Objects
<span class="lineNum">      64 </span>                :    * @ingroup utilities
<span class="lineNum">      65 </span>                :    *
<span class="lineNum">      66 </span>                :    *  Function objects, or @e functors, are objects with an @c operator()
<span class="lineNum">      67 </span>                :    *  defined and accessible.  They can be passed as arguments to algorithm
<span class="lineNum">      68 </span>                :    *  templates and used in place of a function pointer.  Not only is the
<span class="lineNum">      69 </span>                :    *  resulting expressiveness of the library increased, but the generated
<span class="lineNum">      70 </span>                :    *  code can be more efficient than what you might write by hand.  When we
<span class="lineNum">      71 </span>                :    *  refer to &quot;functors,&quot; then, generally we include function pointers in
<span class="lineNum">      72 </span>                :    *  the description as well.
<span class="lineNum">      73 </span>                :    *
<span class="lineNum">      74 </span>                :    *  Often, functors are only created as temporaries passed to algorithm
<span class="lineNum">      75 </span>                :    *  calls, rather than being created as named variables.
<span class="lineNum">      76 </span>                :    *
<span class="lineNum">      77 </span>                :    *  Two examples taken from the standard itself follow.  To perform a
<span class="lineNum">      78 </span>                :    *  by-element addition of two vectors @c a and @c b containing @c double,
<span class="lineNum">      79 </span>                :    *  and put the result in @c a, use
<span class="lineNum">      80 </span>                :    *  \code
<span class="lineNum">      81 </span>                :    *  transform (a.begin(), a.end(), b.begin(), a.begin(), plus&lt;double&gt;());
<span class="lineNum">      82 </span>                :    *  \endcode
<span class="lineNum">      83 </span>                :    *  To negate every element in @c a, use
<span class="lineNum">      84 </span>                :    *  \code
<span class="lineNum">      85 </span>                :    *  transform(a.begin(), a.end(), a.begin(), negate&lt;double&gt;());
<span class="lineNum">      86 </span>                :    *  \endcode
<span class="lineNum">      87 </span>                :    *  The addition and negation functions will be inlined directly.
<span class="lineNum">      88 </span>                :    *
<span class="lineNum">      89 </span>                :    *  The standard functors are derived from structs named @c unary_function
<span class="lineNum">      90 </span>                :    *  and @c binary_function.  These two classes contain nothing but typedefs,
<span class="lineNum">      91 </span>                :    *  to aid in generic (template) programming.  If you write your own
<span class="lineNum">      92 </span>                :    *  functors, you might consider doing the same.
<span class="lineNum">      93 </span>                :    *
<span class="lineNum">      94 </span>                :    *  @{
<span class="lineNum">      95 </span>                :    */
<span class="lineNum">      96 </span>                :   /**
<span class="lineNum">      97 </span>                :    *  This is one of the @link functors functor base classes@endlink.
<span class="lineNum">      98 </span>                :    */
<span class="lineNum">      99 </span>                :   template&lt;typename _Arg, typename _Result&gt;
<span class="lineNum">     100 </span>                :     struct unary_function
<span class="lineNum">     101 </span>                :     {
<span class="lineNum">     102 </span>                :       typedef _Arg argument_type;   ///&lt; @c argument_type is the type of the
<span class="lineNum">     103 </span>                :                                     ///     argument (no surprises here)
<span class="lineNum">     104 </span>                : 
<span class="lineNum">     105 </span>                :       typedef _Result result_type;  ///&lt; @c result_type is the return type
<span class="lineNum">     106 </span>                :     };
<span class="lineNum">     107 </span>                : 
<span class="lineNum">     108 </span>                :   /**
<span class="lineNum">     109 </span>                :    *  This is one of the @link functors functor base classes@endlink.
<span class="lineNum">     110 </span>                :    */
<span class="lineNum">     111 </span>                :   template&lt;typename _Arg1, typename _Arg2, typename _Result&gt;
<span class="lineNum">     112 </span>                :     struct binary_function
<span class="lineNum">     113 </span>                :     {
<span class="lineNum">     114 </span>                :       typedef _Arg1 first_argument_type;   ///&lt; the type of the first argument
<span class="lineNum">     115 </span>                :                                            ///  (no surprises here)
<span class="lineNum">     116 </span>                : 
<span class="lineNum">     117 </span>                :       typedef _Arg2 second_argument_type;  ///&lt; the type of the second argument
<span class="lineNum">     118 </span>                :       typedef _Result result_type;         ///&lt; type of the return type
<span class="lineNum">     119 </span>                :     };
<span class="lineNum">     120 </span>                :   /** @}  */
<span class="lineNum">     121 </span>                : 
<span class="lineNum">     122 </span>                :   // 20.3.2 arithmetic
<span class="lineNum">     123 </span>                :   /** @defgroup arithmetic_functors Arithmetic Classes
<span class="lineNum">     124 </span>                :    * @ingroup functors
<span class="lineNum">     125 </span>                :    *
<span class="lineNum">     126 </span>                :    *  Because basic math often needs to be done during an algorithm,
<span class="lineNum">     127 </span>                :    *  the library provides functors for those operations.  See the
<span class="lineNum">     128 </span>                :    *  documentation for @link functors the base classes@endlink
<span class="lineNum">     129 </span>                :    *  for examples of their use.
<span class="lineNum">     130 </span>                :    *
<span class="lineNum">     131 </span>                :    *  @{
<span class="lineNum">     132 </span>                :    */
<span class="lineNum">     133 </span>                :   /// One of the @link arithmetic_functors math functors@endlink.
<span class="lineNum">     134 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     135 </span>                :     struct plus : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     136 </span>                :     {
<span class="lineNum">     137 </span>                :       _Tp
<span class="lineNum">     138 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     139 </span>                :       { return __x + __y; }
<span class="lineNum">     140 </span>                :     };
<span class="lineNum">     141 </span>                : 
<span class="lineNum">     142 </span>                :   /// One of the @link arithmetic_functors math functors@endlink.
<span class="lineNum">     143 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     144 </span>                :     struct minus : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     145 </span>                :     {
<span class="lineNum">     146 </span>                :       _Tp
<span class="lineNum">     147 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     148 </span>                :       { return __x - __y; }
<span class="lineNum">     149 </span>                :     };
<span class="lineNum">     150 </span>                : 
<span class="lineNum">     151 </span>                :   /// One of the @link arithmetic_functors math functors@endlink.
<span class="lineNum">     152 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     153 </span>                :     struct multiplies : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     154 </span>                :     {
<span class="lineNum">     155 </span>                :       _Tp
<span class="lineNum">     156 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     157 </span>                :       { return __x * __y; }
<span class="lineNum">     158 </span>                :     };
<span class="lineNum">     159 </span>                : 
<span class="lineNum">     160 </span>                :   /// One of the @link arithmetic_functors math functors@endlink.
<span class="lineNum">     161 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     162 </span>                :     struct divides : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     163 </span>                :     {
<span class="lineNum">     164 </span>                :       _Tp
<span class="lineNum">     165 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     166 </span>                :       { return __x / __y; }
<span class="lineNum">     167 </span>                :     };
<span class="lineNum">     168 </span>                : 
<span class="lineNum">     169 </span>                :   /// One of the @link arithmetic_functors math functors@endlink.
<span class="lineNum">     170 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     171 </span>                :     struct modulus : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     172 </span>                :     {
<span class="lineNum">     173 </span>                :       _Tp
<span class="lineNum">     174 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     175 </span>                :       { return __x % __y; }
<span class="lineNum">     176 </span>                :     };
<span class="lineNum">     177 </span>                : 
<span class="lineNum">     178 </span>                :   /// One of the @link arithmetic_functors math functors@endlink.
<span class="lineNum">     179 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     180 </span>                :     struct negate : public unary_function&lt;_Tp, _Tp&gt;
<span class="lineNum">     181 </span>                :     {
<span class="lineNum">     182 </span>                :       _Tp
<span class="lineNum">     183 </span>                :       operator()(const _Tp&amp; __x) const
<span class="lineNum">     184 </span>                :       { return -__x; }
<span class="lineNum">     185 </span>                :     };
<span class="lineNum">     186 </span>                :   /** @}  */
<span class="lineNum">     187 </span>                : 
<span class="lineNum">     188 </span>                :   // 20.3.3 comparisons
<span class="lineNum">     189 </span>                :   /** @defgroup comparison_functors Comparison Classes
<span class="lineNum">     190 </span>                :    * @ingroup functors
<span class="lineNum">     191 </span>                :    *
<span class="lineNum">     192 </span>                :    *  The library provides six wrapper functors for all the basic comparisons
<span class="lineNum">     193 </span>                :    *  in C++, like @c &lt;.
<span class="lineNum">     194 </span>                :    *
<span class="lineNum">     195 </span>                :    *  @{
<span class="lineNum">     196 </span>                :    */
<span class="lineNum">     197 </span>                :   /// One of the @link comparison_functors comparison functors@endlink.
<span class="lineNum">     198 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     199 </span>                :     struct equal_to : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     200 </span>                :     {
<span class="lineNum">     201 </span>                :       bool
<span class="lineNum">     202 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     203 </span>                :       { return __x == __y; }
<span class="lineNum">     204 </span>                :     };
<span class="lineNum">     205 </span>                : 
<span class="lineNum">     206 </span>                :   /// One of the @link comparison_functors comparison functors@endlink.
<span class="lineNum">     207 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     208 </span>                :     struct not_equal_to : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     209 </span>                :     {
<span class="lineNum">     210 </span>                :       bool
<span class="lineNum">     211 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     212 </span>                :       { return __x != __y; }
<span class="lineNum">     213 </span>                :     };
<span class="lineNum">     214 </span>                : 
<span class="lineNum">     215 </span>                :   /// One of the @link comparison_functors comparison functors@endlink.
<span class="lineNum">     216 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     217 </span>                :     struct greater : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     218 </span>                :     {
<span class="lineNum">     219 </span>                :       bool
<span class="lineNum">     220 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     221 </span>                :       { return __x &gt; __y; }
<span class="lineNum">     222 </span>                :     };
<span class="lineNum">     223 </span>                : 
<span class="lineNum">     224 </span>                :   /// One of the @link comparison_functors comparison functors@endlink.
<span class="lineNum">     225 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     226 </span>                :     struct less : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     227 </span>                :     {
<span class="lineNum">     228 </span>                :       bool
<span class="lineNum">     229 </span><span class="lineCov">            932 :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const</span>
<span class="lineNum">     230 </span><span class="lineCov">            932 :       { return __x &lt; __y; }</span>
<span class="lineNum">     231 </span>                :     };
<span class="lineNum">     232 </span>                : 
<span class="lineNum">     233 </span>                :   /// One of the @link comparison_functors comparison functors@endlink.
<span class="lineNum">     234 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     235 </span>                :     struct greater_equal : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     236 </span>                :     {
<span class="lineNum">     237 </span>                :       bool
<span class="lineNum">     238 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     239 </span>                :       { return __x &gt;= __y; }
<span class="lineNum">     240 </span>                :     };
<span class="lineNum">     241 </span>                : 
<span class="lineNum">     242 </span>                :   /// One of the @link comparison_functors comparison functors@endlink.
<span class="lineNum">     243 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     244 </span>                :     struct less_equal : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     245 </span>                :     {
<span class="lineNum">     246 </span>                :       bool
<span class="lineNum">     247 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     248 </span>                :       { return __x &lt;= __y; }
<span class="lineNum">     249 </span>                :     };
<span class="lineNum">     250 </span>                :   /** @}  */
<span class="lineNum">     251 </span>                : 
<span class="lineNum">     252 </span>                :   // 20.3.4 logical operations
<span class="lineNum">     253 </span>                :   /** @defgroup logical_functors Boolean Operations Classes
<span class="lineNum">     254 </span>                :    * @ingroup functors
<span class="lineNum">     255 </span>                :    *
<span class="lineNum">     256 </span>                :    *  Here are wrapper functors for Boolean operations: @c &amp;&amp;, @c ||,
<span class="lineNum">     257 </span>                :    *  and @c !.
<span class="lineNum">     258 </span>                :    *
<span class="lineNum">     259 </span>                :    *  @{
<span class="lineNum">     260 </span>                :    */
<span class="lineNum">     261 </span>                :   /// One of the @link logical_functors Boolean operations functors@endlink.
<span class="lineNum">     262 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     263 </span>                :     struct logical_and : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     264 </span>                :     {
<span class="lineNum">     265 </span>                :       bool
<span class="lineNum">     266 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     267 </span>                :       { return __x &amp;&amp; __y; }
<span class="lineNum">     268 </span>                :     };
<span class="lineNum">     269 </span>                : 
<span class="lineNum">     270 </span>                :   /// One of the @link logical_functors Boolean operations functors@endlink.
<span class="lineNum">     271 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     272 </span>                :     struct logical_or : public binary_function&lt;_Tp, _Tp, bool&gt;
<span class="lineNum">     273 </span>                :     {
<span class="lineNum">     274 </span>                :       bool
<span class="lineNum">     275 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     276 </span>                :       { return __x || __y; }
<span class="lineNum">     277 </span>                :     };
<span class="lineNum">     278 </span>                : 
<span class="lineNum">     279 </span>                :   /// One of the @link logical_functors Boolean operations functors@endlink.
<span class="lineNum">     280 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     281 </span>                :     struct logical_not : public unary_function&lt;_Tp, bool&gt;
<span class="lineNum">     282 </span>                :     {
<span class="lineNum">     283 </span>                :       bool
<span class="lineNum">     284 </span>                :       operator()(const _Tp&amp; __x) const
<span class="lineNum">     285 </span>                :       { return !__x; }
<span class="lineNum">     286 </span>                :     };
<span class="lineNum">     287 </span>                :   /** @}  */
<span class="lineNum">     288 </span>                : 
<span class="lineNum">     289 </span>                :   // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">     290 </span>                :   // DR 660. Missing Bitwise Operations.
<span class="lineNum">     291 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     292 </span>                :     struct bit_and : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     293 </span>                :     {
<span class="lineNum">     294 </span>                :       _Tp
<span class="lineNum">     295 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     296 </span>                :       { return __x &amp; __y; }
<span class="lineNum">     297 </span>                :     };
<span class="lineNum">     298 </span>                : 
<span class="lineNum">     299 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     300 </span>                :     struct bit_or : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     301 </span>                :     {
<span class="lineNum">     302 </span>                :       _Tp
<span class="lineNum">     303 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     304 </span>                :       { return __x | __y; }
<span class="lineNum">     305 </span>                :     };
<span class="lineNum">     306 </span>                : 
<span class="lineNum">     307 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     308 </span>                :     struct bit_xor : public binary_function&lt;_Tp, _Tp, _Tp&gt;
<span class="lineNum">     309 </span>                :     {
<span class="lineNum">     310 </span>                :       _Tp
<span class="lineNum">     311 </span>                :       operator()(const _Tp&amp; __x, const _Tp&amp; __y) const
<span class="lineNum">     312 </span>                :       { return __x ^ __y; }
<span class="lineNum">     313 </span>                :     };
<span class="lineNum">     314 </span>                : 
<span class="lineNum">     315 </span>                :   // 20.3.5 negators
<span class="lineNum">     316 </span>                :   /** @defgroup negators Negators
<span class="lineNum">     317 </span>                :    * @ingroup functors
<span class="lineNum">     318 </span>                :    *
<span class="lineNum">     319 </span>                :    *  The functions @c not1 and @c not2 each take a predicate functor
<span class="lineNum">     320 </span>                :    *  and return an instance of @c unary_negate or
<span class="lineNum">     321 </span>                :    *  @c binary_negate, respectively.  These classes are functors whose
<span class="lineNum">     322 </span>                :    *  @c operator() performs the stored predicate function and then returns
<span class="lineNum">     323 </span>                :    *  the negation of the result.
<span class="lineNum">     324 </span>                :    *
<span class="lineNum">     325 </span>                :    *  For example, given a vector of integers and a trivial predicate,
<span class="lineNum">     326 </span>                :    *  \code
<span class="lineNum">     327 </span>                :    *  struct IntGreaterThanThree
<span class="lineNum">     328 </span>                :    *    : public std::unary_function&lt;int, bool&gt;
<span class="lineNum">     329 </span>                :    *  {
<span class="lineNum">     330 </span>                :    *      bool operator() (int x) { return x &gt; 3; }
<span class="lineNum">     331 </span>                :    *  };
<span class="lineNum">     332 </span>                :    *
<span class="lineNum">     333 </span>                :    *  std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
<span class="lineNum">     334 </span>                :    *  \endcode
<span class="lineNum">     335 </span>                :    *  The call to @c find_if will locate the first index (i) of @c v for which
<span class="lineNum">     336 </span>                :    *  &quot;!(v[i] &gt; 3)&quot; is true.
<span class="lineNum">     337 </span>                :    *
<span class="lineNum">     338 </span>                :    *  The not1/unary_negate combination works on predicates taking a single
<span class="lineNum">     339 </span>                :    *  argument.  The not2/binary_negate combination works on predicates which
<span class="lineNum">     340 </span>                :    *  take two arguments.
<span class="lineNum">     341 </span>                :    *
<span class="lineNum">     342 </span>                :    *  @{
<span class="lineNum">     343 </span>                :    */
<span class="lineNum">     344 </span>                :   /// One of the @link negators negation functors@endlink.
<span class="lineNum">     345 </span>                :   template&lt;typename _Predicate&gt;
<span class="lineNum">     346 </span>                :     class unary_negate
<span class="lineNum">     347 </span>                :     : public unary_function&lt;typename _Predicate::argument_type, bool&gt;
<span class="lineNum">     348 </span>                :     {
<span class="lineNum">     349 </span>                :     protected:
<span class="lineNum">     350 </span>                :       _Predicate _M_pred;
<span class="lineNum">     351 </span>                : 
<span class="lineNum">     352 </span>                :     public:
<span class="lineNum">     353 </span>                :       explicit
<span class="lineNum">     354 </span>                :       unary_negate(const _Predicate&amp; __x) : _M_pred(__x) { }
<span class="lineNum">     355 </span>                : 
<span class="lineNum">     356 </span>                :       bool
<span class="lineNum">     357 </span>                :       operator()(const typename _Predicate::argument_type&amp; __x) const
<span class="lineNum">     358 </span>                :       { return !_M_pred(__x); }
<span class="lineNum">     359 </span>                :     };
<span class="lineNum">     360 </span>                : 
<span class="lineNum">     361 </span>                :   /// One of the @link negators negation functors@endlink.
<span class="lineNum">     362 </span>                :   template&lt;typename _Predicate&gt;
<span class="lineNum">     363 </span>                :     inline unary_negate&lt;_Predicate&gt;
<span class="lineNum">     364 </span>                :     not1(const _Predicate&amp; __pred)
<span class="lineNum">     365 </span>                :     { return unary_negate&lt;_Predicate&gt;(__pred); }
<span class="lineNum">     366 </span>                : 
<span class="lineNum">     367 </span>                :   /// One of the @link negators negation functors@endlink.
<span class="lineNum">     368 </span>                :   template&lt;typename _Predicate&gt;
<span class="lineNum">     369 </span>                :     class binary_negate
<span class="lineNum">     370 </span>                :     : public binary_function&lt;typename _Predicate::first_argument_type,
<span class="lineNum">     371 </span>                :                              typename _Predicate::second_argument_type, bool&gt;
<span class="lineNum">     372 </span>                :     {
<span class="lineNum">     373 </span>                :     protected:
<span class="lineNum">     374 </span>                :       _Predicate _M_pred;
<span class="lineNum">     375 </span>                : 
<span class="lineNum">     376 </span>                :     public:
<span class="lineNum">     377 </span>                :       explicit
<span class="lineNum">     378 </span>                :       binary_negate(const _Predicate&amp; __x) : _M_pred(__x) { }
<span class="lineNum">     379 </span>                : 
<span class="lineNum">     380 </span>                :       bool
<span class="lineNum">     381 </span>                :       operator()(const typename _Predicate::first_argument_type&amp; __x,
<span class="lineNum">     382 </span>                :                  const typename _Predicate::second_argument_type&amp; __y) const
<span class="lineNum">     383 </span>                :       { return !_M_pred(__x, __y); }
<span class="lineNum">     384 </span>                :     };
<span class="lineNum">     385 </span>                : 
<span class="lineNum">     386 </span>                :   /// One of the @link negators negation functors@endlink.
<span class="lineNum">     387 </span>                :   template&lt;typename _Predicate&gt;
<span class="lineNum">     388 </span>                :     inline binary_negate&lt;_Predicate&gt;
<span class="lineNum">     389 </span>                :     not2(const _Predicate&amp; __pred)
<span class="lineNum">     390 </span>                :     { return binary_negate&lt;_Predicate&gt;(__pred); }
<span class="lineNum">     391 </span>                :   /** @}  */
<span class="lineNum">     392 </span>                : 
<span class="lineNum">     393 </span>                :   // 20.3.7 adaptors pointers functions
<span class="lineNum">     394 </span>                :   /** @defgroup pointer_adaptors Adaptors for pointers to functions
<span class="lineNum">     395 </span>                :    * @ingroup functors
<span class="lineNum">     396 </span>                :    *
<span class="lineNum">     397 </span>                :    *  The advantage of function objects over pointers to functions is that
<span class="lineNum">     398 </span>                :    *  the objects in the standard library declare nested typedefs describing
<span class="lineNum">     399 </span>                :    *  their argument and result types with uniform names (e.g., @c result_type
<span class="lineNum">     400 </span>                :    *  from the base classes @c unary_function and @c binary_function).
<span class="lineNum">     401 </span>                :    *  Sometimes those typedefs are required, not just optional.
<span class="lineNum">     402 </span>                :    *
<span class="lineNum">     403 </span>                :    *  Adaptors are provided to turn pointers to unary (single-argument) and
<span class="lineNum">     404 </span>                :    *  binary (double-argument) functions into function objects.  The
<span class="lineNum">     405 </span>                :    *  long-winded functor @c pointer_to_unary_function is constructed with a
<span class="lineNum">     406 </span>                :    *  function pointer @c f, and its @c operator() called with argument @c x
<span class="lineNum">     407 </span>                :    *  returns @c f(x).  The functor @c pointer_to_binary_function does the same
<span class="lineNum">     408 </span>                :    *  thing, but with a double-argument @c f and @c operator().
<span class="lineNum">     409 </span>                :    *
<span class="lineNum">     410 </span>                :    *  The function @c ptr_fun takes a pointer-to-function @c f and constructs
<span class="lineNum">     411 </span>                :    *  an instance of the appropriate functor.
<span class="lineNum">     412 </span>                :    *
<span class="lineNum">     413 </span>                :    *  @{
<span class="lineNum">     414 </span>                :    */
<span class="lineNum">     415 </span>                :   /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
<span class="lineNum">     416 </span>                :   template&lt;typename _Arg, typename _Result&gt;
<span class="lineNum">     417 </span>                :     class pointer_to_unary_function : public unary_function&lt;_Arg, _Result&gt;
<span class="lineNum">     418 </span>                :     {
<span class="lineNum">     419 </span>                :     protected:
<span class="lineNum">     420 </span>                :       _Result (*_M_ptr)(_Arg);
<span class="lineNum">     421 </span>                : 
<span class="lineNum">     422 </span>                :     public:
<span class="lineNum">     423 </span>                :       pointer_to_unary_function() { }
<span class="lineNum">     424 </span>                : 
<span class="lineNum">     425 </span>                :       explicit
<span class="lineNum">     426 </span>                :       pointer_to_unary_function(_Result (*__x)(_Arg))
<span class="lineNum">     427 </span>                :       : _M_ptr(__x) { }
<span class="lineNum">     428 </span>                : 
<span class="lineNum">     429 </span>                :       _Result
<span class="lineNum">     430 </span>                :       operator()(_Arg __x) const
<span class="lineNum">     431 </span>                :       { return _M_ptr(__x); }
<span class="lineNum">     432 </span>                :     };
<span class="lineNum">     433 </span>                : 
<span class="lineNum">     434 </span>                :   /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
<span class="lineNum">     435 </span>                :   template&lt;typename _Arg, typename _Result&gt;
<span class="lineNum">     436 </span>                :     inline pointer_to_unary_function&lt;_Arg, _Result&gt;
<span class="lineNum">     437 </span>                :     ptr_fun(_Result (*__x)(_Arg))
<span class="lineNum">     438 </span>                :     { return pointer_to_unary_function&lt;_Arg, _Result&gt;(__x); }
<span class="lineNum">     439 </span>                : 
<span class="lineNum">     440 </span>                :   /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
<span class="lineNum">     441 </span>                :   template&lt;typename _Arg1, typename _Arg2, typename _Result&gt;
<span class="lineNum">     442 </span>                :     class pointer_to_binary_function
<span class="lineNum">     443 </span>                :     : public binary_function&lt;_Arg1, _Arg2, _Result&gt;
<span class="lineNum">     444 </span>                :     {
<span class="lineNum">     445 </span>                :     protected:
<span class="lineNum">     446 </span>                :       _Result (*_M_ptr)(_Arg1, _Arg2);
<span class="lineNum">     447 </span>                : 
<span class="lineNum">     448 </span>                :     public:
<span class="lineNum">     449 </span>                :       pointer_to_binary_function() { }
<span class="lineNum">     450 </span>                : 
<span class="lineNum">     451 </span>                :       explicit
<span class="lineNum">     452 </span>                :       pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
<span class="lineNum">     453 </span>                :       : _M_ptr(__x) { }
<span class="lineNum">     454 </span>                : 
<span class="lineNum">     455 </span>                :       _Result
<span class="lineNum">     456 </span>                :       operator()(_Arg1 __x, _Arg2 __y) const
<span class="lineNum">     457 </span>                :       { return _M_ptr(__x, __y); }
<span class="lineNum">     458 </span>                :     };
<span class="lineNum">     459 </span>                : 
<span class="lineNum">     460 </span>                :   /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
<span class="lineNum">     461 </span>                :   template&lt;typename _Arg1, typename _Arg2, typename _Result&gt;
<span class="lineNum">     462 </span>                :     inline pointer_to_binary_function&lt;_Arg1, _Arg2, _Result&gt;
<span class="lineNum">     463 </span>                :     ptr_fun(_Result (*__x)(_Arg1, _Arg2))
<span class="lineNum">     464 </span>                :     { return pointer_to_binary_function&lt;_Arg1, _Arg2, _Result&gt;(__x); }
<span class="lineNum">     465 </span>                :   /** @}  */
<span class="lineNum">     466 </span>                : 
<span class="lineNum">     467 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     468 </span>                :     struct _Identity : public unary_function&lt;_Tp,_Tp&gt;
<span class="lineNum">     469 </span>                :     {
<span class="lineNum">     470 </span>                :       _Tp&amp;
<span class="lineNum">     471 </span>                :       operator()(_Tp&amp; __x) const
<span class="lineNum">     472 </span>                :       { return __x; }
<span class="lineNum">     473 </span>                : 
<span class="lineNum">     474 </span>                :       const _Tp&amp;
<span class="lineNum">     475 </span><span class="lineCov">             12 :       operator()(const _Tp&amp; __x) const</span>
<span class="lineNum">     476 </span><span class="lineCov">             12 :       { return __x; }</span>
<span class="lineNum">     477 </span>                :     };
<span class="lineNum">     478 </span>                : 
<span class="lineNum">     479 </span>                :   template&lt;typename _Pair&gt;
<span class="lineNum">     480 </span>                :     struct _Select1st : public unary_function&lt;_Pair,
<span class="lineNum">     481 </span>                :                                               typename _Pair::first_type&gt;
<span class="lineNum">     482 </span>                :     {
<span class="lineNum">     483 </span>                :       typename _Pair::first_type&amp;
<span class="lineNum">     484 </span>                :       operator()(_Pair&amp; __x) const
<span class="lineNum">     485 </span>                :       { return __x.first; }
<span class="lineNum">     486 </span>                : 
<span class="lineNum">     487 </span>                :       const typename _Pair::first_type&amp;
<span class="lineNum">     488 </span><span class="lineCov">            635 :       operator()(const _Pair&amp; __x) const</span>
<span class="lineNum">     489 </span><span class="lineCov">            635 :       { return __x.first; }</span>
<span class="lineNum">     490 </span>                :     };
<span class="lineNum">     491 </span>                : 
<span class="lineNum">     492 </span>                :   template&lt;typename _Pair&gt;
<span class="lineNum">     493 </span>                :     struct _Select2nd : public unary_function&lt;_Pair,
<span class="lineNum">     494 </span>                :                                               typename _Pair::second_type&gt;
<span class="lineNum">     495 </span>                :     {
<span class="lineNum">     496 </span>                :       typename _Pair::second_type&amp;
<span class="lineNum">     497 </span>                :       operator()(_Pair&amp; __x) const
<span class="lineNum">     498 </span>                :       { return __x.second; }
<span class="lineNum">     499 </span>                : 
<span class="lineNum">     500 </span>                :       const typename _Pair::second_type&amp;
<span class="lineNum">     501 </span>                :       operator()(const _Pair&amp; __x) const
<span class="lineNum">     502 </span>                :       { return __x.second; }
<span class="lineNum">     503 </span>                :     };
<span class="lineNum">     504 </span>                : 
<span class="lineNum">     505 </span>                :   // 20.3.8 adaptors pointers members
<span class="lineNum">     506 </span>                :   /** @defgroup memory_adaptors Adaptors for pointers to members
<span class="lineNum">     507 </span>                :    * @ingroup functors
<span class="lineNum">     508 </span>                :    *
<span class="lineNum">     509 </span>                :    *  There are a total of 8 = 2^3 function objects in this family.
<span class="lineNum">     510 </span>                :    *   (1) Member functions taking no arguments vs member functions taking
<span class="lineNum">     511 </span>                :    *        one argument.
<span class="lineNum">     512 </span>                :    *   (2) Call through pointer vs call through reference.
<span class="lineNum">     513 </span>                :    *   (3) Const vs non-const member function.
<span class="lineNum">     514 </span>                :    *
<span class="lineNum">     515 </span>                :    *  All of this complexity is in the function objects themselves.  You can
<span class="lineNum">     516 </span>                :    *   ignore it by using the helper function mem_fun and mem_fun_ref,
<span class="lineNum">     517 </span>                :    *   which create whichever type of adaptor is appropriate.
<span class="lineNum">     518 </span>                :    *
<span class="lineNum">     519 </span>                :    *  @{
<span class="lineNum">     520 </span>                :    */
<span class="lineNum">     521 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     522 </span>                :   /// pointers@endlink.
<span class="lineNum">     523 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     524 </span>                :     class mem_fun_t : public unary_function&lt;_Tp*, _Ret&gt;
<span class="lineNum">     525 </span>                :     {
<span class="lineNum">     526 </span>                :     public:
<span class="lineNum">     527 </span>                :       explicit
<span class="lineNum">     528 </span>                :       mem_fun_t(_Ret (_Tp::*__pf)())
<span class="lineNum">     529 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     530 </span>                : 
<span class="lineNum">     531 </span>                :       _Ret
<span class="lineNum">     532 </span>                :       operator()(_Tp* __p) const
<span class="lineNum">     533 </span>                :       { return (__p-&gt;*_M_f)(); }
<span class="lineNum">     534 </span>                : 
<span class="lineNum">     535 </span>                :     private:
<span class="lineNum">     536 </span>                :       _Ret (_Tp::*_M_f)();
<span class="lineNum">     537 </span>                :     };
<span class="lineNum">     538 </span>                : 
<span class="lineNum">     539 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     540 </span>                :   /// pointers@endlink.
<span class="lineNum">     541 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     542 </span>                :     class const_mem_fun_t : public unary_function&lt;const _Tp*, _Ret&gt;
<span class="lineNum">     543 </span>                :     {
<span class="lineNum">     544 </span>                :     public:
<span class="lineNum">     545 </span>                :       explicit
<span class="lineNum">     546 </span>                :       const_mem_fun_t(_Ret (_Tp::*__pf)() const)
<span class="lineNum">     547 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     548 </span>                : 
<span class="lineNum">     549 </span>                :       _Ret
<span class="lineNum">     550 </span>                :       operator()(const _Tp* __p) const
<span class="lineNum">     551 </span>                :       { return (__p-&gt;*_M_f)(); }
<span class="lineNum">     552 </span>                : 
<span class="lineNum">     553 </span>                :     private:
<span class="lineNum">     554 </span>                :       _Ret (_Tp::*_M_f)() const;
<span class="lineNum">     555 </span>                :     };
<span class="lineNum">     556 </span>                : 
<span class="lineNum">     557 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     558 </span>                :   /// pointers@endlink.
<span class="lineNum">     559 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     560 </span>                :     class mem_fun_ref_t : public unary_function&lt;_Tp, _Ret&gt;
<span class="lineNum">     561 </span>                :     {
<span class="lineNum">     562 </span>                :     public:
<span class="lineNum">     563 </span>                :       explicit
<span class="lineNum">     564 </span>                :       mem_fun_ref_t(_Ret (_Tp::*__pf)())
<span class="lineNum">     565 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     566 </span>                : 
<span class="lineNum">     567 </span>                :       _Ret
<span class="lineNum">     568 </span>                :       operator()(_Tp&amp; __r) const
<span class="lineNum">     569 </span>                :       { return (__r.*_M_f)(); }
<span class="lineNum">     570 </span>                : 
<span class="lineNum">     571 </span>                :     private:
<span class="lineNum">     572 </span>                :       _Ret (_Tp::*_M_f)();
<span class="lineNum">     573 </span>                :   };
<span class="lineNum">     574 </span>                : 
<span class="lineNum">     575 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     576 </span>                :   /// pointers@endlink.
<span class="lineNum">     577 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     578 </span>                :     class const_mem_fun_ref_t : public unary_function&lt;_Tp, _Ret&gt;
<span class="lineNum">     579 </span>                :     {
<span class="lineNum">     580 </span>                :     public:
<span class="lineNum">     581 </span>                :       explicit
<span class="lineNum">     582 </span>                :       const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
<span class="lineNum">     583 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     584 </span>                : 
<span class="lineNum">     585 </span>                :       _Ret
<span class="lineNum">     586 </span>                :       operator()(const _Tp&amp; __r) const
<span class="lineNum">     587 </span>                :       { return (__r.*_M_f)(); }
<span class="lineNum">     588 </span>                : 
<span class="lineNum">     589 </span>                :     private:
<span class="lineNum">     590 </span>                :       _Ret (_Tp::*_M_f)() const;
<span class="lineNum">     591 </span>                :     };
<span class="lineNum">     592 </span>                : 
<span class="lineNum">     593 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     594 </span>                :   /// pointers@endlink.
<span class="lineNum">     595 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     596 </span>                :     class mem_fun1_t : public binary_function&lt;_Tp*, _Arg, _Ret&gt;
<span class="lineNum">     597 </span>                :     {
<span class="lineNum">     598 </span>                :     public:
<span class="lineNum">     599 </span>                :       explicit
<span class="lineNum">     600 </span>                :       mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
<span class="lineNum">     601 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     602 </span>                : 
<span class="lineNum">     603 </span>                :       _Ret
<span class="lineNum">     604 </span>                :       operator()(_Tp* __p, _Arg __x) const
<span class="lineNum">     605 </span>                :       { return (__p-&gt;*_M_f)(__x); }
<span class="lineNum">     606 </span>                : 
<span class="lineNum">     607 </span>                :     private:
<span class="lineNum">     608 </span>                :       _Ret (_Tp::*_M_f)(_Arg);
<span class="lineNum">     609 </span>                :     };
<span class="lineNum">     610 </span>                : 
<span class="lineNum">     611 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     612 </span>                :   /// pointers@endlink.
<span class="lineNum">     613 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     614 </span>                :     class const_mem_fun1_t : public binary_function&lt;const _Tp*, _Arg, _Ret&gt;
<span class="lineNum">     615 </span>                :     {
<span class="lineNum">     616 </span>                :     public:
<span class="lineNum">     617 </span>                :       explicit
<span class="lineNum">     618 </span>                :       const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
<span class="lineNum">     619 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     620 </span>                : 
<span class="lineNum">     621 </span>                :       _Ret
<span class="lineNum">     622 </span>                :       operator()(const _Tp* __p, _Arg __x) const
<span class="lineNum">     623 </span>                :       { return (__p-&gt;*_M_f)(__x); }
<span class="lineNum">     624 </span>                : 
<span class="lineNum">     625 </span>                :     private:
<span class="lineNum">     626 </span>                :       _Ret (_Tp::*_M_f)(_Arg) const;
<span class="lineNum">     627 </span>                :     };
<span class="lineNum">     628 </span>                : 
<span class="lineNum">     629 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     630 </span>                :   /// pointers@endlink.
<span class="lineNum">     631 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     632 </span>                :     class mem_fun1_ref_t : public binary_function&lt;_Tp, _Arg, _Ret&gt;
<span class="lineNum">     633 </span>                :     {
<span class="lineNum">     634 </span>                :     public:
<span class="lineNum">     635 </span>                :       explicit
<span class="lineNum">     636 </span>                :       mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
<span class="lineNum">     637 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     638 </span>                : 
<span class="lineNum">     639 </span>                :       _Ret
<span class="lineNum">     640 </span>                :       operator()(_Tp&amp; __r, _Arg __x) const
<span class="lineNum">     641 </span>                :       { return (__r.*_M_f)(__x); }
<span class="lineNum">     642 </span>                : 
<span class="lineNum">     643 </span>                :     private:
<span class="lineNum">     644 </span>                :       _Ret (_Tp::*_M_f)(_Arg);
<span class="lineNum">     645 </span>                :     };
<span class="lineNum">     646 </span>                : 
<span class="lineNum">     647 </span>                :   /// One of the @link memory_adaptors adaptors for member
<span class="lineNum">     648 </span>                :   /// pointers@endlink.
<span class="lineNum">     649 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     650 </span>                :     class const_mem_fun1_ref_t : public binary_function&lt;_Tp, _Arg, _Ret&gt;
<span class="lineNum">     651 </span>                :     {
<span class="lineNum">     652 </span>                :     public:
<span class="lineNum">     653 </span>                :       explicit
<span class="lineNum">     654 </span>                :       const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
<span class="lineNum">     655 </span>                :       : _M_f(__pf) { }
<span class="lineNum">     656 </span>                : 
<span class="lineNum">     657 </span>                :       _Ret
<span class="lineNum">     658 </span>                :       operator()(const _Tp&amp; __r, _Arg __x) const
<span class="lineNum">     659 </span>                :       { return (__r.*_M_f)(__x); }
<span class="lineNum">     660 </span>                : 
<span class="lineNum">     661 </span>                :     private:
<span class="lineNum">     662 </span>                :       _Ret (_Tp::*_M_f)(_Arg) const;
<span class="lineNum">     663 </span>                :     };
<span class="lineNum">     664 </span>                : 
<span class="lineNum">     665 </span>                :   // Mem_fun adaptor helper functions.  There are only two:
<span class="lineNum">     666 </span>                :   // mem_fun and mem_fun_ref.
<span class="lineNum">     667 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     668 </span>                :     inline mem_fun_t&lt;_Ret, _Tp&gt;
<span class="lineNum">     669 </span>                :     mem_fun(_Ret (_Tp::*__f)())
<span class="lineNum">     670 </span>                :     { return mem_fun_t&lt;_Ret, _Tp&gt;(__f); }
<span class="lineNum">     671 </span>                : 
<span class="lineNum">     672 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     673 </span>                :     inline const_mem_fun_t&lt;_Ret, _Tp&gt;
<span class="lineNum">     674 </span>                :     mem_fun(_Ret (_Tp::*__f)() const)
<span class="lineNum">     675 </span>                :     { return const_mem_fun_t&lt;_Ret, _Tp&gt;(__f); }
<span class="lineNum">     676 </span>                : 
<span class="lineNum">     677 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     678 </span>                :     inline mem_fun_ref_t&lt;_Ret, _Tp&gt;
<span class="lineNum">     679 </span>                :     mem_fun_ref(_Ret (_Tp::*__f)())
<span class="lineNum">     680 </span>                :     { return mem_fun_ref_t&lt;_Ret, _Tp&gt;(__f); }
<span class="lineNum">     681 </span>                : 
<span class="lineNum">     682 </span>                :   template&lt;typename _Ret, typename _Tp&gt;
<span class="lineNum">     683 </span>                :     inline const_mem_fun_ref_t&lt;_Ret, _Tp&gt;
<span class="lineNum">     684 </span>                :     mem_fun_ref(_Ret (_Tp::*__f)() const)
<span class="lineNum">     685 </span>                :     { return const_mem_fun_ref_t&lt;_Ret, _Tp&gt;(__f); }
<span class="lineNum">     686 </span>                : 
<span class="lineNum">     687 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     688 </span>                :     inline mem_fun1_t&lt;_Ret, _Tp, _Arg&gt;
<span class="lineNum">     689 </span>                :     mem_fun(_Ret (_Tp::*__f)(_Arg))
<span class="lineNum">     690 </span>                :     { return mem_fun1_t&lt;_Ret, _Tp, _Arg&gt;(__f); }
<span class="lineNum">     691 </span>                : 
<span class="lineNum">     692 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     693 </span>                :     inline const_mem_fun1_t&lt;_Ret, _Tp, _Arg&gt;
<span class="lineNum">     694 </span>                :     mem_fun(_Ret (_Tp::*__f)(_Arg) const)
<span class="lineNum">     695 </span>                :     { return const_mem_fun1_t&lt;_Ret, _Tp, _Arg&gt;(__f); }
<span class="lineNum">     696 </span>                : 
<span class="lineNum">     697 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     698 </span>                :     inline mem_fun1_ref_t&lt;_Ret, _Tp, _Arg&gt;
<span class="lineNum">     699 </span>                :     mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
<span class="lineNum">     700 </span>                :     { return mem_fun1_ref_t&lt;_Ret, _Tp, _Arg&gt;(__f); }
<span class="lineNum">     701 </span>                : 
<span class="lineNum">     702 </span>                :   template&lt;typename _Ret, typename _Tp, typename _Arg&gt;
<span class="lineNum">     703 </span>                :     inline const_mem_fun1_ref_t&lt;_Ret, _Tp, _Arg&gt;
<span class="lineNum">     704 </span>                :     mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
<span class="lineNum">     705 </span>                :     { return const_mem_fun1_ref_t&lt;_Ret, _Tp, _Arg&gt;(__f); }
<span class="lineNum">     706 </span>                : 
<span class="lineNum">     707 </span>                :   /** @}  */
<span class="lineNum">     708 </span>                : 
<span class="lineNum">     709 </span>                : _GLIBCXX_END_NAMESPACE
<span class="lineNum">     710 </span>                : 
<span class="lineNum">     711 </span>                : #if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
<span class="lineNum">     712 </span>                : # include &lt;backward/binders.h&gt;
<span class="lineNum">     713 </span>                : #endif
<span class="lineNum">     714 </span>                : 
<span class="lineNum">     715 </span>                : #endif /* _STL_FUNCTION_H */
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
